Creating an Assertion
Description
To create a new assertion in the Model Tree:
Select the position in a Declaration Section where the new assertion should be inserted
From the Edit menu select Insert – Other (or press the
<Insert>
key)In the dialog box select
Assertion and press OK
Enter a name for the new assertion (if you are creating an indexed assertion, you can type the indices as well)
Press
<Enter>
to create the new assertion (or press<Esc>
to abort the operation)
The newly created assertion is not yet ready for use, because you should at least specify its definition attribute. To modify the attributes of the newly created assertion:
Press
<Enter>
or double click on the assertion node.
The most commonly used attributes of an assertion are discussed below.
INDEX DOMAIN
: TheINDEX DOMAIN
attribute should be specified in order to declare indexed assertions. Thewizard will display the Set Dependency Tree of your model and allows you to select one or more indices.
DEFINITION
: TheDEFINITION
attribute should contain a logical expression that is to be verified when the assertion is executed.ACTION
: TheACTION
attribute is used to specify some non-default action (by default a message box with displaying the contents of theTEXT
attribute is displayed), that is performed when the assertion fails. TheACTION
attribute is comparable to aBODY
attribute of an AIMMS function or procedure.
Learn more about